{% extends "vegetable/base_default.html" %}

{% block content %}

	{% if user.is_authenticated %}
	<h2>Logged in</h2>
	<p>Du bist bereits eingeloggt</p>
	{% else %}
	    <h2>Login</h2>
	 
	    <form action="" method="post">
		{% csrf_token %}
		<div>
			{{ form.username.errors }}
			<label for="id_username">Username: </label>
			{{ form.username }}
		</div>
		<div>
			{{ form.password.errors }}
			<label for="id_password">Password: </label>
			{{ form.password }}
		</div>
	

		<input type="submit" value="Login" />
	    </form>
	<p>Noch kein Login? <a href="/user/register/">Registrieren</a>
	{% endif %}

{% endblock %}
